﻿#ifndef QMLLOGSBROWSER_H
#define QMLLOGSBROWSER_H

#include <QObject>
#include <QDebug>
#include <QDateTime>

class QmlLogsBrowser : public QObject
{
    Q_OBJECT
public:
    explicit QmlLogsBrowser(QObject *parent = nullptr);
    static QmlLogsBrowser *getInstance();

signals:
    // define function for qml
    void pushLogsToQml(QString s);

public slots:
    void logsPrintSlot(QString s);

public:
    Q_INVOKABLE void log(QString s);
    void log(const char *format, ...);

};

#endif // QMLLOGSBROWSER_H
